package tools

import (
	"dingbot/errhelp"
	"strconv"
)

func IntToString(i int) string {
	return strconv.Itoa(i)
}

func Int64ToString(i int64) string {
	return strconv.FormatInt(i, 10)
}

func StringToInt(s string) int {
	res, err := strconv.Atoi(s)
	if !errhelp.Tag(err, "StringToInt") {
		return 0
	}
	return res
}
